﻿using SqlSugar;
using System;

namespace CoreShop.Model
{
    /// <summary>
    /// 会员用户表
    /// </summary>
    public partial class corecmsuser
    {
        /// <summary>
        /// 用户id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public Int64 id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(ColumnName = "userName", IsNullable = true)]
        public String userName { get; set; }

        /// <summary>
        /// 推荐人
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "staffId", IsNullable = false)]
        //public long? staffId { get; set; }

        /// <summary>
        /// 员工id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "creatorId", IsNullable = true)]
        public Int64? creatorId { get; set; }

        /// <summary>
        /// 关联的股东Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sysUserId", IsNullable = false)]
        public Int64? sysUserId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "passWord", IsNullable = true)]
        public String passWord { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "mobile", IsNullable = true)]
        public String mobile { get; set; }

        /// <summary>
        /// 性别[1男2女3未知]
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sex", IsNullable = false)]
        public Int32? sex { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "birthday", IsNullable = true)]
        public DateTime? birthday { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "avatarImage", IsNullable = true)]
        public String avatarImage { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "nickName", IsNullable = true)]
        public String nickName { get; set; }

        /// <summary>
        /// 余额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "balance")]
        public Decimal balance { get; set; }

        /// <summary>
        /// 赠款
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "giftBalance", IsNullable = false)]
        public Decimal? giftBalance { get; set; }

        /// <summary>
        /// 积分
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "point", IsNullable = false)]
        public Int32? point { get; set; }

        /// <summary>
        /// 用户等级
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "grade", IsNullable = false)]
        public Int64? grade { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "createTime", IsNullable = false)]
        public DateTime? createTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "updataTime", IsNullable = true)]
        public DateTime? updataTime { get; set; }

        /// <summary>
        /// 状态[1正常2停用]
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "status", IsNullable = true)]
        public Int32? status { get; set; }

        /// <summary>
        /// 推荐人
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "parentId", IsNullable = false)]
        public Int64 parentId { get; set; }

        /// <summary>
        /// 关联三方账户
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userWx", IsNullable = false)]
        public Int32 userWx { get; set; }

        /// <summary>
        /// 删除标志 有数据就是删除
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isDelete", IsNullable = false)]
        public Boolean isDelete { get; set; }

        /// <summary>
        /// 次卡余额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "quantity", IsNullable = false)]
        public Int32? quantity { get; set; }

        /// <summary>
        /// 门店ID
        /// </summary>
        [SugarColumn(ColumnName = "storeId", IsNullable = false)]
        [SplitField]
        public long? storeId { get; set; }

        /// <summary>
        /// 总店ID
        /// </summary>
        [SugarColumn(ColumnName = "corpId", IsNullable = false)]
        public System.Int32 corpId { get; set; }

        /// <summary>
        /// 客户分类
        /// </summary>
        [SugarColumn(ColumnName = "userCategoryId", IsNullable = false)]
        public System.Int64? userCategoryId { get; set; } = 0;

        /// <summary>
        /// 客户来源,对应：GlobalEnumVars.UserSource
        /// </summary>
        [SugarColumn(ColumnName = "source", IsNullable = true)]
        public System.Int32? source { get; set; }

        /// <summary>
        /// 共享标志
        /// </summary>
        [SugarColumn(ColumnName = "shareFlag", IsNullable = true)]
        public Boolean? shareFlag { get; set; } = true;

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "modifyTime", IsNullable = true)]
        public Int64? modifyTime { get; set; } = 0;

        /// <summary>
        /// 启用日期
        /// </summary>
        [SugarColumn(ColumnName = "starDate", IsNullable = true)]
        public DateTime? starDate { get; set; }

        /// <summary>
        /// 失效日期
        /// </summary>
        [SugarColumn(ColumnName = "endDate", IsNullable = true)]
        public DateTime? endDate { get; set; }

        /// <summary>
        /// 会员号
        /// </summary>
        [SugarColumn(ColumnName = "number", IsNullable = true)]
        public string number { get; set; }

        /// <summary>
        /// 会员卡号
        /// </summary>
        [SugarColumn(ColumnName = "cardNo", IsNullable = true)]
        public string cardNo { get; set; }

        /// <summary>
        /// 会员卡Id
        /// </summary>
        [SugarColumn(ColumnName = "cardId", IsNullable = true)]
        public string cardId { get; set; }

        /// <summary>
        /// 会员卡类型Id
        /// </summary>
        [SugarColumn(ColumnName = "cardTypeId", IsNullable = true)]
        public string cardTypeId { get; set; }

        /// <summary>
        /// 合计充值金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumBalance", IsNullable = false)]
        public Decimal? sumBalance { get; set; }
    }
}
